home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9907 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.2 KB  |  58 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc,comp.lang.c
  2. Path: howland.reston.ans.net!torn!nott!emr1!jagrant
  3. From: jagrant@emr1.emr.ca (John Grant)
  4. Subject: Re: Help needed using C's conio.h functions.
  5. Message-ID: <Do8ro0.10A@emr1.emr.ca>
  6. Organization: Energy, Mines, and Resources, Ottawa
  7. References: <4i7sun$49j@darkstar.UCSC.EDU>
  8. Date: Thu, 14 Mar 1996 05:09:35 GMT
  9.  
  10. In article <4i7sun$49j@darkstar.UCSC.EDU> nwaussie@cats.ucsc.edu (Nicholas Cory Williams) writes:
  11. >
  12. >I am trying to program a game that was origianlly going to be for DOS until
  13. >I realised that my Turbo C/C++ compiler for Windows only compiled for windows.
  14. >Now, I have to find a way of using basic text windows or something to output
  15. >my text card game.
  16. >I thought I had found the perfect solution when I found functions like
  17. >cprintf and window and clrscr, etc. in the conio.h library however, they
  18. >won't work.
  19. >
  20. >#include<conio.h>
  21. >
  22. >int main(void)
  23. >{
  24. >    clrscr();
  25. >    window(10, 10, 20, 20);
  26. >    cprintf("Hello world\r\n");
  27. >    getch();
  28. >    return 0;
  29. >}
  30. >
  31. >This program gives me these warnings and errors:
  32. >Warning WINDOW.C 6: Call to function 'window' with no prototype in function
  33. >main
  34. >Warning WINDOW.C 7: Call to function 'cprintf' with no prototype in function
  35. >main
  36. >Linker Error: Undefined symbol _cprintf in module WINDOW.C
  37. >Linker Error: Undefined symbol _window in module WINDOW.C
  38. >
  39. >I think I have all my directories set up right, (all my other functions
  40. >work fine with calls to other libraries).
  41. >
  42. >Might this have something to do with me running all this under Win95? Is there
  43. >something else I need to do to get these to work? I tried putting in
  44. >prototypes for these functions but that only got rid of the warnings.
  45. >
  46. >Please help me....
  47.     
  48.     You asked a question about DOS vs Windows & Turbo C++ for Windows a
  49.     few days ago. I answered it. In my answer, I told you all about
  50.     <conio.h> and gave you some advice about DOS & Windows programming
  51.     Either you ignored it or you didn't bother reading the reply.
  52.     I used my newsreader to find the article for you and I have e-mailed
  53.     it to you. You need to read more carefully.
  54. -- 
  55. John A. Grant                        jagrant@emr1.emr.ca
  56. Airborne Geophysics
  57. Geological Survey of Canada, Ottawa
  58.